home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 014 / sslog.arc / SSLOG.BAS next >
Encoding:
BASIC Source File  |  1987-12-13  |  19.4 KB  |  399 lines

  1. 10 '   SSLOG.BAS version 1.3 -  Copyrigh⌠ (C⌐ 1986,198╖ b∙ Clarkσ Greenσ K1J╪  NO╘ FO╥ COMMERCIA╠ USE
  2. 20 '
  3. 30 '   This Microsoft (tm) BASIC program will build a complete log package for the ARRL Sweepstakes Contest.
  4. 40 '
  5. 50 '   The file containing the log entries must be an ASCII file in the following format: 
  6. 60 '               (each mode requires a separate log entry file)
  7. 70 '
  8. 80 '   <*BAND>  <+TIME ON -TIME OFF>    <TIME>    RCV'D NR   RCV'D PREC   RCV'D CALLSIGN   RCV'D CHECK   RCV'D SEC.
  9. 90 '               (each log entry must be followed by a carriage return)
  10. 100 '
  11. 110 '   At least one space must be between each field of each log entry. 
  12. 120 '
  13. 130 '   Any time a band change is made, the first field in the log entry should be an asterisk, followed by the band.
  14. 140 '
  15. 150 '                for example:    *14  would indicate a band change to 14 MHz.
  16. 160 '
  17. 170 '   To indicate on and off times, enter the time of going on or off, preceded immediately by a plus <+> to
  18. 180 '   indicate ON or a minus <-> to indicate OFF. (MUST be 4 digits)
  19. 190 '       
  20. 200 '                for example:    +0134  would indicate an on time of 0134
  21. 210 '
  22. 220 '
  23. 230 '   Only a changed digit in the time field must be present; for example, if the contest begins at 1800Z and the
  24. 240 '   first contact is made at 1802Z and the second contact is made at 1805Z, then only 5 need be entered in the
  25. 250 '   time field. If the third contact is made at 1812Z, then 12 should be entered in the time field. If the next
  26. 260 '   contact is made at 1812Z, then no number need be entered in the time field (however, be sure to enter a space
  27. 270 '   to indicate separation between fields).
  28. 280 '
  29. 290 '
  30. 300 '          A short set of log entries might be:
  31. 310 '
  32. 320 '          *14 +0100  0104   434 B WB1AVA 78 CT
  33. 330 '                        5   2   A K1JX   68 CT
  34. 340 '          *21           9   99  A WA1NEV 73 CT
  35. 350 '                            765 B W3ZZ   52 MDC
  36. 360 '              -0123    14   948 B W1VD   70 CT
  37. 370 '
  38. 380 '   This log extract shows an operating period beginning at 0100 on the 14 MHz band.
  39. 390 '   A band change to 21 MHz was made at 0109, and the period ended at 0123.
  40. 400 '
  41. 410 '   These files will be produced:
  42. 420 '            <filename>.LOG - this is a complete log ready for printing
  43. 430 '            <filename>.DUP - this is a sorted duplicate listing ready for printing
  44. 440 '            <filename>.SUM - this is a summary sheet ready for printing
  45. 450 '
  46. 460 '
  47. 470 '    Depending on the version of BASIC for your particular machine, the CLS (Clear Screen) command must
  48. 480 '   be changed.  Consult your own computer's BASIC documentation for more information.
  49. 490 '
  50. 500 '
  51. 510 '   If compiling (a VERY good idea for several orders of magnitude improvement in speed), use O and E switches 
  52. 520 '
  53. 530 '
  54. 540 '
  55. 550 WARNING$="Copyrigh⌠ (C⌐ 1986,198╖ b∙ Clarkσ Greenσ K1J╪  NO╘ FO╥ COMMERCIA╠ USE"
  56. 560 '
  57. 570 '  Define arrays and variables
  58. 580 DEFINT A-Z : OPTION BASE 1
  59. 590 DIM ENTRY$(2000), MULT$(75), Q(75)
  60. 600  MULT$(1)="CT" : MULT$(2)="EMA" : MULT$(3)="ME" : MULT$(4)="NH" : MULT$(5)="RI" : MULT$(6)="VT" : MULT$(7)="WMA"
  61. 610  MULT$(8)="ENY" : MULT$(9)="NLI" : MULT$(10)="NNJ" : MULT$(11)="SNJ" : MULT$(12)="WNY"
  62. 620  MULT$(13)="DE" : MULT$(14)="EPA" : MULT$(15)="MDC" : MULT$(16)="WPA"
  63. 630  MULT$(17)="AL" : MULT$(18)="GA" : MULT$(19)="KY" : MULT$(20)="NC" : MULT$(21)="NFL" : MULT$(22)="SC" : MULT$(23)="SFL"
  64. 640   MULT$(24)="TN" : MULT$(25)="VA" : MULT$(26)="WIN"
  65. 650  MULT$(27)="AR" : MULT$(28)="LA" : MULT$(29)="MS" : MULT$(30)="NM" : MULT$(31)="NTX" : MULT$(32)="OK" : MULT$(33)="STX"
  66. 660   MULT$(34)="WTX"
  67. 670  MULT$(35)="EB" : MULT$(36)="LAX" : MULT$(37)="ORG" : MULT$(38)="SB" : MULT$(39)="SCV" : MULT$(40)="SDG"
  68. 680   MULT$(41)="SF" : MULT$(42)="SJV" : MULT$(43)="SV" : MULT$(44)="PAC"
  69. 690  MULT$(45)="AZ" : MULT$(46)="ID" : MULT$(47)="MT" : MULT$(48)="NV" : MULT$(49)="OR" : MULT$(50)="UT" : MULT$(51)="WA"
  70. 700   MULT$(52)="WY" : MULT$(53)="AK"
  71. 710  MULT$(54)="MI" : MULT$(55)="OH" : MULT$(56)="WV"
  72. 720  MULT$(57)="IL" : MULT$(58)="IN" : MULT$(59)="WI"
  73. 730  MULT$(60)="CO" : MULT$(61)="IA" : MULT$(62)="KS" : MULT$(63)="MN" : MULT$(64)="MO" : MULT$(65)="NE"
  74. 740   MULT$(66)="ND" : MULT$(67)="SD"
  75. 750  MULT$(68)="MAR" : MULT$(69)="PQ" : MULT$(70)="ON" : MULT$(71)="MB" : MULT$(72)="SK" : MULT$(73)="AB"
  76. 760   MULT$(74)="BC" : MULT$(75)="NWT"
  77. 770 BANDCHG$= "*" : BLANK$=" " : BL$="" : CLOCKOFF$="-" : CLOCKON$="+" : TRUE=-1
  78. 780 DUPE$="- Duplicate -" : NEWSECTION$="  Mult. #"
  79. 790 '  Define format strings for printouts
  80. 800 LOGFORM$="\ \  \    \  \      \  \  \  ####  \     \  \          \ \\  \ \ \             \"
  81. 810 DUPFORM$="      \         \   \          \   \          \   \          \   \          \"
  82. 820 SUMFORM$="  \        \   \        \   \        \   \        \   \        \   \        \"
  83. 830 '
  84. 840 '  Get information from user
  85. 850 CLS
  86. 860 PRINT TAB(23) " Sweepstakes Contest Log Processor " : PRINT : PRINT
  87. 870 PRINT : PRINT TAB(5) "What is the station callsign?  ";
  88. 880  INPUT "", MYCALL$
  89. 890 PRINT : PRINT TAB(5) "What is your precedence (A or B)?  ";
  90. 900  INPUT "", MYPREC$
  91. 910   IF MYPREC$<>"A" AND MYPREC$<>"B" THEN PRINT CHR$(7);: GOTO 890
  92. 920 PRINT : PRINT TAB(5) "What is your check?  ";
  93. 930  INPUT "", MYCHECK$
  94. 940   IF LEN(MYCHECK$)<>2 THEN PRINT CHR$(7);: GOTO 920
  95. 950 PRINT : PRINT TAB(5) "What ARRL section is the station in?  ";
  96. 960  INPUT "", MYSECTION$
  97. 970   SECTION$=MYSECTION$ : GOSUB 3750 : IF NOT INLIST THEN PRINT CHR$(7);: GOTO 950
  98. 980 PRINT : PRINT TAB(5) "What is the beginning date of the contest? <dd/mm/yr> ";
  99. 990  INPUT "", STARTDATE$
  100. 1000   MARK=INSTR(STARTDATE$,"/") : IF MARK=0 THEN MARK=INSTR(STARTDATE$,"-")
  101. 1010    STARTDAY=VAL(LEFT$(STARTDATE$,MARK-1))
  102. 1020    STARTDATE$=RIGHT$(STARTDATE$,LEN(STARTDATE$)-MARK)
  103. 1030   MARK=INSTR(STARTDATE$,"/") : IF MARK=0 THEN MARK=INSTR(STARTDATE$,"-")
  104. 1040    MON$=" Nov"
  105. 1050    YR$=RIGHT$(STARTDATE$,LEN(STARTDATE$)-MARK)
  106. 1060 PRINT : PRINT TAB(5) "What is the GMT starting time for the contest?  ";
  107. 1070  INPUT "", STARTGMT$
  108. 1080   IF LEN(STARTGMT$)<>4 THEN PRINT CHR$(7);: GOTO 1060
  109. 1090 PRINT : PRINT TAB(5) "What file is the log extract located in?  ";
  110. 1100  INPUT "", INFILE$
  111. 1110  GOSUB 3620                                     ' check to see if file exists
  112. 1120  IF INSTR(INFILE$,".")<>0 THEN OUTFILE$=LEFT$(INFILE$,INSTR(INFILE$,".")-1) ELSE OUTFILE$=INFILE$
  113. 1130 '
  114. 1140 '  Collect log extract from input file and assign data to arrays
  115. 1150 CLS
  116. 1160 PRINT : PRINT TAB(5) "Duping and counting...  ";
  117. 1170 '
  118. 1180 '  Initialize variables
  119. 1190 RAWTOTAL=0 : QSOS=0 : DUPES=0 : MULTNR=0 : TOTAL.TIME=0
  120. 1200 DAY=STARTDAY : PREVIOUSGMT$=STARTGMT$                       ' (re)set starting time and day
  121. 1210 ONTIME$=STARTGMT$
  122. 1220 ON.TIME=VAL(LEFT$(ONTIME$,2))*60+VAL(RIGHT$(ONTIME$,2))     ' set on-time to default value of contest beginning
  123. 1230 '
  124. 1240 '  Open input data file and output .LOG file
  125. 1250 OPEN INFILE$ FOR INPUT AS #1
  126. 1260 OPEN OUTFILE$+".LOG" FOR OUTPUT AS #2
  127. 1270 '
  128. 1280 '  Input data, process, and enter into output file
  129. 1290  WHILE NOT EOF(1)
  130. 1300   LINE INPUT #1, THISENTRY$                             ' read entire line from disc file
  131. 1310    WHILE ASC(RIGHT$(THISENTRY$,1))<48 AND LEN(THISENTRY$)>0
  132. 1320     THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)          ' strip off trailing spaces,etc
  133. 1330     WEND
  134. 1340    IF LEN(THISENTRY$)>0 THEN RAWTOTAL=RAWTOTAL+1 ELSE GOTO 2540
  135. 1350 '
  136. 1360 '  Look for band change
  137. 1370   BAND$=BL$
  138. 1380   MARK=INSTR(THISENTRY$,BANDCHG$) : IF MARK=0 GOTO 1470     ' if there isn't a bandchange, jump ahead
  139. 1390   MID$(THISENTRY$,MARK,1)=BLANK$                 ' blank out *
  140. 1400   MARK=MARK+1                         ' point to next character
  141. 1410   WHILE ASC(MID$(THISENTRY$,MARK,1))>=46 AND ASC(MID$(THISENTRY$,MARK,1))<=57
  142. 1420    BAND$=BAND$+MID$(THISENTRY$,MARK,1)             ' parse bandchange string
  143. 1430    MID$(THISENTRY$,MARK,1)=BLANK$
  144. 1440    MARK=MARK+1
  145. 1450    WEND
  146. 1460 '
  147. 1470 '  Look for on-time indication
  148. 1480   ONTIME$=BL$ : TIME.NOTE$=BL$
  149. 1490   MARK=INSTR(THISENTRY$,CLOCKON$) : IF MARK=0 GOTO 1610
  150. 1500   MID$(THISENTRY$,MARK,1)=BLANK$
  151. 1510   MARK=MARK+1
  152. 1520   WHILE ASC(MID$(THISENTRY$,MARK,1))>=46 AND ASC(MID$(THISENTRY$,MARK,1))<=57
  153. 1530    ONTIME$=ONTIME$+MID$(THISENTRY$,MARK,1)             ' parse on-time string
  154. 1540    MID$(THISENTRY$,MARK,1)=BLANK$
  155. 1550    MARK=MARK+1
  156. 1560    WEND
  157. 1570   ONTIME$=LEFT$(PREVIOUSGMT$,(4-LEN(ONTIME$)))+ONTIME$     ' complete missing time string
  158. 1580   ON.TIME=VAL(LEFT$(ONTIME$,2))*60+VAL(RIGHT$(ONTIME$,2))
  159. 1590   TIME.NOTE$="on  "+ONTIME$
  160. 1600 '
  161. 1610 '  Look for off-time indication
  162. 1620   OFFTIME$=BL$
  163. 1630   MARK=INSTR(THISENTRY$,CLOCKOFF$) : IF MARK=0 GOTO 1770
  164. 1640   MID$(THISENTRY$,MARK,1)=BLANK$
  165. 1650   MARK=MARK+1
  166. 1660   WHILE ASC(MID$(THISENTRY$,MARK,1))>=46 AND ASC(MID$(THISENTRY$,MARK,1))<=57
  167. 1670    OFFTIME$=OFFTIME$+MID$(THISENTRY$,MARK,1)         ' parse off-time string
  168. 1680    MID$(THISENTRY$,MARK,1)=BLANK$
  169. 1690    MARK=MARK+1
  170. 1700    WEND
  171. 1710   OFFTIME$=LEFT$(PREVIOUSGMT$,(4-LEN(OFFTIME$)))+OFFTIME$     ' complete missing time string
  172. 1720   TIME.NOTE$="off "+OFFTIME$
  173. 1730   OFF.TIME=VAL(LEFT$(OFFTIME$,2))*60+VAL(RIGHT$(OFFTIME$,2))
  174. 1740    IF OFF.TIME<ON.TIME THEN OFF.TIME=OFF.TIME+1440
  175. 1750   TOTAL.TIME=TOTAL.TIME+OFF.TIME-ON.TIME             ' calculate cumulative operating time
  176. 1760 '
  177. 1770 '  Separate received section from THISENTRY$
  178. 1780   SECTION$=BL$                         ' initialize section field to blank
  179. 1790   WHILE ASC(RIGHT$(THISENTRY$,1))>=48
  180. 1800    SECTION$=RIGHT$(THISENTRY$,1)+SECTION$
  181. 1810    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)
  182. 1820    WEND
  183. 1830   WHILE ASC(RIGHT$(THISENTRY$,1))<48
  184. 1840    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)           ' strip off trailing spaces,etc
  185. 1850    WEND
  186. 1860 '
  187. 1870 '  Separate received check from THISENTRY$
  188. 1880   CHECK$=BL$                         ' initialize check field to blank
  189. 1890   WHILE ASC(RIGHT$(THISENTRY$,1))>=48
  190. 1900    CHECK$=RIGHT$(THISENTRY$,1)+CHECK$
  191. 1910    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)
  192. 1920    WEND
  193. 1930   WHILE ASC(RIGHT$(THISENTRY$,1))<48
  194. 1940    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)           ' strip off trailing spaces,etc
  195. 1950    WEND
  196. 1960 '
  197. 1970 '  Separate callsign from THISENTRY$
  198. 1980   CALLSIGN$=BL$                         ' initialize callsign field to blank
  199. 1990   WHILE ASC(RIGHT$(THISENTRY$,1))>=47
  200. 2000    CALLSIGN$=RIGHT$(THISENTRY$,1)+CALLSIGN$
  201. 2010    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)
  202. 2020    WEND
  203. 2030   WHILE ASC(RIGHT$(THISENTRY$,1))<48
  204. 2040    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)           ' strip off trailing spaces,etc
  205. 2050    WEND
  206. 2060 '
  207. 2070 '  Separate received prec from THISENTRY$
  208. 2080   PREC$=RIGHT$(THISENTRY$,1)                                ' 1 character prec
  209. 2090    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)
  210. 2100   WHILE ASC(RIGHT$(THISENTRY$,1))<48
  211. 2110    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)           ' strip off trailing spaces,etc
  212. 2120    WEND
  213. 2130 '
  214. 2140 '  Separate received number from THISENTRY$
  215. 2150   NR$=BL$                             ' initialize number field to blank
  216. 2160   WHILE ASC(RIGHT$(THISENTRY$,1))>=48
  217. 2170    NR$=RIGHT$(THISENTRY$,1)+NR$
  218. 2180    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)
  219. 2190    WEND
  220. 2200   WHILE ASC(RIGHT$(THISENTRY$,1))<48
  221. 2210    THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1)           ' strip off trailing spaces,etc
  222. 2220    WEND
  223. 2230   NR$=SPACE$(4-LEN(NR$))+NR$+"  "+PREC$                     ' concatenate number and prec.
  224. 2240 '
  225. 2250 '  Separate GMT from THISENTRY$
  226. 2260   IF LEN(THISENTRY$)=0 GOTO 2310
  227. 2270   WHILE ASC(LEFT$(THISENTRY$,1))<48
  228. 2280    THISENTRY$=RIGHT$(THISENTRY$,LEN(THISENTRY$)-1)             ' strip off leading spaces
  229. 2290    WEND
  230. 2300 '  Fill in missing time data 
  231. 2310   GMT$=LEFT$(PREVIOUSGMT$,(4-LEN(THISENTRY$)))+THISENTRY$
  232. 2320   THEDATE$=BL$ : IF GMT$<PREVIOUSGMT$ THEN DAY=DAY+1 : THEDATE$=STR$(DAY)+MON$ : THEDATE$=RIGHT$(THEDATE$,LEN(THEDATE$)-1)
  233. 2330 '
  234. 2340 '  Check for dupes
  235. 2350   DUPE.QSO=NOT TRUE : NOTE$=BL$                             ' clear note field
  236. 2360   FOR I=1 TO QSOS
  237. 2370    IF CALLSIGN$=ENTRY$(I) THEN NOTE$=DUPE$ : DUPES=DUPES+1 : DUPE.QSO=TRUE : I=QSOS
  238. 2380    NEXT I
  239. 2390   IF DUPE.QSO GOTO 2470                     ' if contact is a dupe, skip over multiplier search
  240. 2400   QSOS=QSOS+1 : ENTRY$(QSOS)=CALLSIGN$
  241. 2410 '
  242. 2420 '  Check for multipliers
  243. 2430   GOSUB 3750 : IF NOT INLIST THEN GOSUB 3820
  244. 2440   Q(INDEX)=Q(INDEX)+1
  245. 2450   IF Q(INDEX)=1 THEN MULTNR=MULTNR+1 : NOTE$=NEWSECTION$+STR$(MULTNR)
  246. 2460 '
  247. 2470 '  Write entry to file
  248. 2480    IF (RAWTOTAL-1) MOD 50=0 THEN GOSUB 3910             ' print the header if this is the beginning of a page
  249. 2490   PRINT #2, USING LOGFORM$; BAND$; THEDATE$; TIME.NOTE$; GMT$; RAWTOTAL; NR$; CALLSIGN$; CHECK$; SECTION$; NOTE$
  250. 2500    IF RAWTOTAL MOD 50=0 THEN PRINT #2, CHR$(12)             ' print a form feed if this is the end of the page
  251. 2510 '
  252. 2520 '  Update variables for next entry
  253. 2530   PREVIOUSGMT$=GMT$ : GMT$=BL$
  254. 2540  WEND
  255. 2550 IF RAWTOTAL MOD 50 <>0 THEN PRINT #2, CHR$(12)              ' if a form feed wasn't printed, print one now
  256. 2560 CLOSE
  257. 2570 '
  258. 2580 '  Calculate total operating time
  259. 2590  IF OFFTIME$<>BL$ GOTO 2630                 ' if an off-time was specified, jump ahead
  260. 2600   OFF.TIME=VAL(LEFT$(PREVIOUSGMT$,2))*60+VAL(RIGHT$(PREVIOUSGMT$,2))
  261. 2610    IF OFF.TIME<ON.TIME THEN OFF.TIME=OFF.TIME+1440
  262. 2620    TOTAL.TIME=TOTAL.TIME+OFF.TIME-ON.TIME             ' calculate cumulative operating time
  263. 2630  TOTAL.HRS$=STR$(TOTAL.TIME\60)
  264. 2640  TOTAL.MIN$=STR$(TOTAL.TIME MOD 60)
  265. 2650   TOTAL.MIN$=RIGHT$(TOTAL.MIN$,LEN(TOTAL.MIN$)-1)           ' delete leading space
  266. 2660   WHILE LEN(TOTAL.MIN$)<2
  267. 2670    TOTAL.MIN$="0"+TOTAL.MIN$                                ' append leading zero
  268. 2680    WEND
  269. 2690   TOTAL.MIN$=":"+TOTAL.MIN$
  270. 2700 PRINT "done"
  271. 2710 '
  272. 2720 '  Build dupe sheet
  273. 2730 PRINT : PRINT TAB(5) "Preparing dupe sheet...  ";
  274. 2740 '
  275. 2750 '  Sort callsigns for dupe sheet
  276. 2760 M=QSOS\2
  277. 2770 WHILE M>0
  278. 2780  FOR I=M+1 TO QSOS
  279. 2790   J=I-M
  280. 2800   WHILE J>0
  281. 2810    IF ENTRY$(J)>ENTRY$(J+M) THEN SWAP ENTRY$(J),ENTRY$(J+M) : J=J-M ELSE J=0
  282. 2820    WEND
  283. 2830   NEXT I
  284. 2840  M=M\2
  285. 2850  WEND
  286. 2860 '
  287. 2870 '  Enter dupe sheet into file
  288. 2880 OPEN OUTFILE$+".DUP" FOR OUTPUT AS #1
  289. 2890  IF QSOS MOD 250=0 THEN LASTPAGE=QSOS\250 ELSE LASTPAGE=QSOS\250+1
  290. 2900 FOR PAGE=1 TO LASTPAGE
  291. 2910  PRINT #1, SPC(22-(LEN(MYCALL$))/2); MYCALL$; " -- Sweepstakes Dupe Sheet -- Page"; STR$(PAGE)
  292. 2920  PRINT #1, BL$ : PRINT #1, BL$
  293. 2930  FOR ROW=1 TO 50
  294. 2940   E=(PAGE-1)*250+ROW
  295. 2950   PRINT #1, USING DUPFORM$; ENTRY$(E); ENTRY$(E+50); ENTRY$(E+100); ENTRY$(E+150); ENTRY$(E+200)
  296. 2960   NEXT ROW
  297. 2970  PRINT #1, CHR$(12)                             ' go to next page
  298. 2980  NEXT PAGE
  299. 2990 CLOSE
  300. 3000 PRINT "done"
  301. 3010 '
  302. 3020 '  Build summary listing
  303. 3030 PRINT : PRINT TAB(5) "Preparing summary sheet...  ";
  304. 3040 '
  305. 3050 '  Append QSO count to section name
  306. 3060  FOR I=1 TO 75
  307. 3070   IF Q(I)=0 THEN MULT$(I)=MULT$(I)+SPACE$(4-LEN(MULT$(I)))+"- None" : GOTO 3090
  308. 3080   MULT$(I)=MULT$(I)+SPACE$(4-LEN(MULT$(I)))+"-"+STR$(Q(I))
  309. 3090   NEXT I
  310. 3100 '
  311. 3110 '  Enter summary sheet into file
  312. 3120 OPEN OUTFILE$+".SUM" FOR OUTPUT AS #1
  313. 3130  PRINT #1, SPC(16-(LEN(MYCALL$))/2); MYCALL$; " -- Summary Sheet for "; YR$; " Sweepstakes Contest" 
  314. 3140  PRINT #1, BL$ : PRINT #1, BL$
  315. 3150  PRINT #1, TAB(15) "Section Listing and number of contacts per Section"
  316. 3160  PRINT #1, BL$ : PRINT #1, BL$
  317. 3170  PRINT #1, "      1            2            3            4            5            6"
  318. 3180  PRINT #1, BL$
  319. 3190  PRINT #1, USING SUMFORM$; MULT$(1); MULT$(8); MULT$(13); MULT$(17); MULT$(27); MULT$(35)
  320. 3200  PRINT #1, USING SUMFORM$; MULT$(2); MULT$(9); MULT$(14); MULT$(18); MULT$(28); MULT$(36)
  321. 3210  PRINT #1, USING SUMFORM$; MULT$(3); MULT$(10); MULT$(15); MULT$(19); MULT$(29); MULT$(37)
  322. 3220  PRINT #1, USING SUMFORM$; MULT$(4); MULT$(11); MULT$(16); MULT$(20); MULT$(30); MULT$(38)
  323. 3230  PRINT #1, USING SUMFORM$; MULT$(5); MULT$(12); BL$; MULT$(21); MULT$(31); MULT$(39)
  324. 3240  PRINT #1, USING SUMFORM$; MULT$(6); BL$; BL$; MULT$(22); MULT$(32); MULT$(40)
  325. 3250  PRINT #1, USING SUMFORM$; MULT$(7); BL$; BL$; MULT$(23); MULT$(33); MULT$(41)
  326. 3260  PRINT #1, USING SUMFORM$; BL$; BL$; BL$; MULT$(24); MULT$(34); MULT$(42)
  327. 3270  PRINT #1, USING SUMFORM$; BL$; BL$; BL$; MULT$(25); BL$; MULT$(43)
  328. 3280  PRINT #1, USING SUMFORM$; BL$; BL$; BL$; MULT$(26); BL$; MULT$(44)
  329. 3290  PRINT #1, BL$ : PRINT #1, BL$ : PRINT #1, BL$
  330. 3300  PRINT #1, "      7            8            9            0            VE"
  331. 3310  PRINT #1, BL$
  332. 3320  PRINT #1, USING SUMFORM$; MULT$(44); MULT$(54); MULT$(57); MULT$(60); MULT$(68); BL$
  333. 3330  PRINT #1, USING SUMFORM$; MULT$(45); MULT$(55); MULT$(58); MULT$(61); MULT$(69); BL$
  334. 3340  PRINT #1, USING SUMFORM$; MULT$(46); MULT$(56); MULT$(59); MULT$(62); MULT$(70); BL$
  335. 3350  PRINT #1, USING SUMFORM$; MULT$(47); BL$; BL$; MULT$(63); MULT$(71); BL$
  336. 3360  PRINT #1, USING SUMFORM$; MULT$(48); BL$; BL$; MULT$(64); MULT$(72); BL$
  337. 3370  PRINT #1, USING SUMFORM$; MULT$(49); BL$; BL$; MULT$(65); MULT$(73); BL$
  338. 3380  PRINT #1, USING SUMFORM$; MULT$(50); BL$; BL$; MULT$(66); MULT$(74); BL$
  339. 3390  PRINT #1, USING SUMFORM$; MULT$(51); BL$; BL$; MULT$(67); MULT$(75); BL$
  340. 3400  PRINT #1, USING SUMFORM$; MULT$(52); BL$; BL$; BL$; BL$; BL$
  341. 3410  PRINT #1, USING SUMFORM$; MULT$(53); BL$; BL$; BL$; BL$; BL$
  342. 3420  PRINT #1, BL$ : PRINT #1, BL$ : PRINT #1, BL$
  343. 3430  PRINT #1, TAB(18); "Total Valid QSOs - "; STR$(QSOS); TAB(45); "Dupes - "; STR$(DUPES)
  344. 3440  PRINT #1, TAB(18); "Sections - "; STR$(MULTNR)
  345. 3450  PRINT #1, TAB(18); "Total operating time - "; TOTAL.HRS$; TOTAL.MIN$
  346. 3460  PRINT #1, CHR$(12)
  347. 3470 CLOSE
  348. 3480 PRINT "done"
  349. 3490 '
  350. 3500 '  Print results
  351. 3510 CLS : PRINT CHR$(7)
  352. 3520 PRINT : PRINT TAB(8) "Results" : PRINT TAB(8) "-------"
  353. 3530 PRINT : PRINT TAB(8) "Valid QSOs: "; QSOS
  354. 3540 PRINT : PRINT TAB(8) "Duplicate QSOs: "; DUPES
  355. 3550 PRINT : PRINT TAB(8) "Sections: "; MULTNR
  356. 3560 PRINT : PRINT TAB(8) "Total operating time: "; TOTAL.HRS$; TOTAL.MIN$
  357. 3570 PRINT : PRINT : PRINT 
  358. 3580 PRINT TAB(29) "Press any key to Exit  ";
  359. 3590  ANS$=INPUT$(1)
  360. 3600 CLS : SYSTEM
  361. 3610 '
  362. 3620 '  Subroutine to trap missing file
  363. 3630 ON ERROR GOTO 3690
  364. 3640 OPEN INFILE$ FOR INPUT AS #1                         ' try opening file
  365. 3650 ON ERROR GOTO 0
  366. 3660 CLOSE
  367. 3670 RETURN
  368. 3680 '
  369. 3690 '  Error trap for missing file
  370. 3700 PRINT CHR$(7) : PRINT TAB(4) "That file does not exist - type X to Exit or any other key to continue ";
  371. 3710 ANS$=INPUT$(1) : IF ANS$="X" OR ANS$="x" THEN CLS : SYSTEM
  372. 3720 PRINT 
  373. 3730 RESUME 1090
  374. 3740 '
  375. 3750 '  Subroutine to search multiplier list
  376. 3760 INLIST=NOT TRUE
  377. 3770 FOR I=1 TO 75
  378. 3780  IF SECTION$=MULT$(I) THEN INDEX=I : INLIST=TRUE : I=75
  379. 3790  NEXT I
  380. 3800 RETURN
  381. 3810 '
  382. 3820 '  Subroutine to clear up impossible section
  383. 3830  PRINT CHR$(7) : PRINT
  384. 3840  PRINT TAB(5) "The section for "; CALLSIGN$; " ["; SECTION$; "] must be incorrect."
  385. 3850  PRINT : PRINT TAB(8) "What is the correct section?  "; 
  386. 3860   INPUT "", SECTION$
  387. 3870   GOSUB 3750 : IF NOT INLIST GOTO 3830
  388. 3880  PRINT : PRINT TAB(5) "Back to duping and counting...  ";
  389. 3890  RETURN
  390. 3900 '
  391. 3910 '  Subroutine to print log sheet header
  392. 3920 PRINT #2, MYCALL$; " Sweepstakes Log"; TAB(73); "Page"; STR$(RAWTOTAL\50+1)
  393. 3930 PRINT #2, TAB(27) "Sent:  :---  "; MYPREC$; "  "; MYCALL$; "  "; MYCHECK$; "  "; MYSECTION$
  394. 3940 PRINT #2, TAB(34) "V"
  395. 3950 PRINT #2, "Band  Date    On/Off   Time   Nr    Nr  Pr  Call         Ck  Sec     Notes"
  396. 3960 PRINT #2, STRING$(80,61)
  397. 3970 THEDATE$=STR$(DAY)+MON$ : THEDATE$=RIGHT$(THEDATE$,LEN(THEDATE$)-1)
  398. 3980 RETURN
  399.